package org.jeecg.modules.yinsheng.command.base;

import java.io.Serializable;

/**
 * @ClassName BaseTradeResponseCommand
 * @Description 微信条码支付
 * @Author linxl
 * @Date 2021/3/31 17:15
 * @Version 1.0
 */
public class HeadResponseCommand implements Serializable {

	private static final long serialVersionUID = 1L;
	// 返回请求时传的请求唯一标识
	private String requestId;
	/**
	 * RSA签名字符串，再用Base64编码
	 */
	private String sign;

	/**
	 * 响应码
	 */
	private String code;

	/**
	 * 响应码说明
	 */
	private String msg;

	/**
	 * 业务参数
	 */
	private String bizResponseJson;

	public String getRequestId() {
		return requestId;
	}

	public void setRequestId(String requestId) {
		this.requestId = requestId;
	}

	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getBizResponseJson() {
		return bizResponseJson;
	}

	public void setBizResponseJson(String bizResponseJson) {
		this.bizResponseJson = bizResponseJson;
	}

	public HeadResponseCommand() {
	}

	public HeadResponseCommand(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public HeadResponseCommand(String sign, String code, String msg, String bizResponseJson, String requestId) {
		this.sign = sign;
		this.code = code;
		this.msg = msg;
		this.bizResponseJson = bizResponseJson;
		this.requestId = requestId;
	}

	// 构建失败的返回
	public static HeadResponseCommand buildFailResponse(String code, String msg) {
		HeadResponseCommand responseCommand = new HeadResponseCommand();
		responseCommand.setCode(code);
		responseCommand.setMsg(msg);
		return responseCommand;
	}

	@Override
	public String toString() {
		return "BaseCommonResponseCommand{" + "sign='" + sign + '\'' + ", code='" + code + '\'' + ", msg='" + msg + '\''
				+ ", bizResponseJson='" + bizResponseJson + '\'' + ", requestId='" + requestId + '\'' + '}';
	}
}
